package com.androidproject.modele;

import com.androidproject.Item;
import com.androidproject.R;
import com.androidproject.LineArrayAdapter.RowType;

import android.view.LayoutInflater;
import android.view.View;
import android.widget.TextView;

public class Calendrier implements Item{
	
	private String label;
	private String team1;
	private String team2;
	private String score1;
	private String score2;
	private String day;
	private String month;
	private String year;
	private String hour;
	private String min;
	private String finale;
	
	
	public Calendrier(String label, String team1, String team2, String score1,
			String score2, String day, String month, String year, String hour,
			String min, String finale) {
		this.label = label;
		this.team1 = team1;
		this.team2 = team2;
		this.score1 = score1;
		this.score2 = score2;
		this.day = day;
		this.month = month;
		this.year = year;
		this.hour = hour;
		this.min = min;
		this.finale = finale;
	}
	
	
	public String getLabel() {
		return label;
	}
	public String getTeam1() {
		return team1;
	}
	public String getTeam2() {
		return team2;
	}
	public String getScore1() {
		return score1;
	}
	public String getScore2() {
		return score2;
	}
	public String getDay() {
		return day;
	}
	public String getMonth() {
		return month;
	}
	public String getYear() {
		return year;
	}
	public String getHour() {
		return hour;
	}
	public String getMin() {
		return min;
	}
	public String getFinale() {
		return finale;
	}
	
	@Override
    public int getViewType() {
        return RowType.LIST_ITEM.ordinal();
    }
	
	@Override
    public View getView(LayoutInflater inflater, View convertView) {
        View view;
        if (convertView == null) {
            view = (View) inflater.inflate(R.layout.activity_calendrier_journee, null);
            // Do some initialization
        } else {
            view = convertView;
        }

        
        TextView tvDateTeamScoreScoreTeam = (TextView) view.findViewById(R.id.textDateTeamScoreScoreTeam);
        tvDateTeamScoreScoreTeam.setText(day+"/"+month+"/"+year+" : "+team1+" ("+score1+") - ("+score2+") "+team2);

        return view;
    }

}
